﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace StockGather
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btn_Update_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtBox.Text.Trim()))
                lblMsg.Text = "请输入链接地址!";
            else
            {
                Stockstar.Stock.Gather.GatherData data = new Stockstar.Stock.Gather.GatherData();
                string msg = data.DoUpdate(txtBox.Text.Trim());
                lblMsg.Text = msg;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Stockstar.Stock.Gather.GatherData data = new Stockstar.Stock.Gather.GatherData();
            if (data.DoWork())
                lblMsg.Text = "采集列表成功!";
            else
                lblMsg.Text = "采集列表失败!";
        }

        private void btnClear_Click(object sender, EventArgs e)
        {
            txtBox.Text = "";
            lblMsg.Text = "";
        }


    }
}
